<?php

//  Wtg
//  Copyright (C) 2006 Niels Egberts <niels.egberts@gmail.com>
//
//  This program is free software; you can redistribute it and/or
//  modify it under the terms of the GNU General Public License
//  as published by the Free Software Foundation; either version 2
//  of the License, or (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software
//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
//  02111-1307, USA.
	
DEFINE("IS_GAME", true);

require 'include/connect.php';

if (isset($_SESSION['username'])) 
{
	$_SESSION['id'] = "";
	$_SESSION['username'] = "";
	$_SESSION['password'] = "";
	$_SESSION['email'] = "";
	$_SESSION['status'] = "";
	unset($_SESSION['id']);
	unset($_SESSION['username']);
	unset($_SESSION['password']);
	unset($_SESSION['email']);
	unset($_SESSION['status']);
	echo "<meta http-equiv=\"refresh\" content=\"2;URL=index.php\" />";
	echo "<p>You are logged out, wait until you get redirected to the homepage or click <a href=\"index.php\">HERE</a>.";
	
} else {
	echo "<meta http-equiv=\"refresh\" content=\"2;URL=index.php\" />";
	echo "<p>You were already logged out, wait until you get redirected to the homepage or click <a href=\"index.php\">HERE</a>.";
}

mysql_close();

?>